<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/docs.css" type="text/css" rel="stylesheet" />
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script src="../js/prettify.js" type="text/javascript"></script>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
<div id="api-info-block">
<div class="api-level">H3C CAS云管理平台</div>
</div>
<div id="jd-header">
<h1>查询指定主机的概要信息</h1>
</div>
<div id="jd-content">
<div class="jd-descr">
<p>根据主机id查询指定物理主机的概要信息。</p>
<h2><a name="uri"></a>接口 URI</h2>
<p>/cas/casrs/host/summary/{id}</p>
<h2><a name="access"></a>访问方法</h2>
<dl>
  <dt><b>HTTP 方法</b></dt>
  <dd>GET</dd>
  <dt><b>参数</b></dt>
  <table id="pubmethods" class="jd-sumtable">
    <tbody>
      <tr>
        <th colspan="2">路径参数（Path Parameter）</th>
      </tr>
      <tr>
        <td class="jd-typecol">id</td>
        <td class="jd-linkcol" width="100%"><span class="sympad">主机id 。</span><div class="jd-descrdiv">长整数（long）类型。必须。</div>        </td>
      </tr>
  </table>
</dl>
<h2><a name="result"></a>返回结果</h2>
<dl>
  <dt><b>状态码</b></dt>
  <dd>
  <ul>
    <li>200(OK)：成功。</li>
  </ul>
  </dd>
  <dt><b>消息头</b></dt>
  <br>
  <pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Set-Cookie: JSESSIONID=FEBAB2D49CDC770B0EFB37D7F2181FD1; Path=/cas<br>Content-Type: application/xml<br>Content-Length: 607<br>Date: Wed, 17 Sep 2014 02:51:26 GMT<br>Server: H3C-CVM
</pre>
  <dt><b>消息体</b></dt>
  <div class="source">
    <pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;host&gt;<br>  &lt;name&gt;server3&lt;/name&gt;<br>  &lt;ip&gt;192.168.10.3&lt;/ip&gt;<br>  &lt;model&gt;FlexServer R390&lt;/model&gt;<br>  &lt;vendor&gt;H3C&lt;/vendor&gt;<br>  &lt;cpuModel&gt;Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz&lt;/cpuModel&gt;<br>  &lt;cpuFrequence&gt;2000&lt;/cpuFrequence&gt;<br>  &lt;diskSize&gt;226053&lt;/diskSize&gt;<br>  &lt;memorySize&gt;23815&lt;/memorySize&gt;<br>  &lt;cpuNum&gt;2 * 6 核&lt;/cpuNum&gt;<br>  &lt;vmNum&gt;17&lt;/vmNum&gt;<br>  &lt;cpuRate&gt;14.271844660194175&lt;/cpuRate&gt;<br>  &lt;memRate&gt;77.19262135922331&lt;/memRate&gt;<br>  &lt;status&gt;1&lt;/status&gt;<br>  &lt;runTime&gt;5天13时9分29秒&lt;/runTime&gt;<br>  &lt;version&gt;CVK 2.0 (C0205)&lt;/version&gt;<br>  &lt;cpuFrequenceGhz&gt;2.0GHz&lt;/cpuFrequenceGhz&gt;<br>  &lt;memory&gt;23.26GB&lt;/memory&gt;<br>  &lt;storage&gt;220.75GB&lt;/storage&gt;<br>&lt;/host&gt;</pre>
  </div>
</dl>
<dt><a name="detail"></a><b>元素含义</b></dt>
<table class="jd-sumtable" id="pubmethods">
  <tbody>
    <tr>
      <th colspan="2"><span class="prettyprint lang-xml">host</span>各子元素</th>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
      <td class="jd-linkcol"><span class="sympad">物理机名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">ip</span></td>
      <td class="jd-linkcol"><span class="sympad">物理机ip。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">model</span></td>
      <td class="jd-linkcol"><span class="sympad">服务器型号。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">vendor</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>服务器制造商。
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">cpuModel</span></td>
      <td class="jd-linkcol"><span class="sympad">CPU型号。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">cpuFrequence</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">CPU频率，单位为MHz。</span>
          <div class="jd-descrdiv">整型（Int）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">rate</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机网络吞吐量（单位MBps）。</span>
          <div class="jd-descrdiv">小数（double）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">diskSize</span></td>
      <td class="jd-linkcol"><span class="sympad"> 磁盘大小，单位为MB。</span>
          <div class="jd-descrdiv">长整数（long）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">memorySize</span></td>
      <td class="jd-linkcol"><span class="sympad"> 内存大小，单位为MB。</span>
          <div class="jd-descrdiv">长整数（long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml"></span>cpuNum</td>
      <td class="jd-linkcol"><span class="sympad">CPU总数 个数*核数。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">vmNum</span></td>
      <td class="jd-linkcol"><span class="sympad">主机下虚拟机 启动关闭信息。</span>
          <div class="jd-descrdiv">整型（Int）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">cpuRate</span></td>
      <td class="jd-linkcol"><span class="sympad"></span> CPU利用率
        <div class="jd-descrdiv">小数（double）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">memRate</span></td>
      <td class="jd-linkcol"><span class="sympad"></span> 内存利用率
        <div class="jd-descrdiv">小数（double）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">status</span></td>
      <td class="jd-linkcol"><span class="sympad">状态，取值：0为不正常，1为正常，2为主机不在HA集群中，3为维护状态。</span>
          <div class="jd-descrdiv">整型（Int）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">runTime</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>运行时间。
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">version</span></td>
      <td class="jd-linkcol"><span class="sympad">主机版本。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">cpuFrequenceGhz</span></td>
      <td class="jd-linkcol"><span class="sympad">CPU频率，单位为GHz。用于前台显示概要信息。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">memory</span></td>
      <td class="jd-linkcol"><span class="sympad">内存大小 带单位 用于前台显示概要信息。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">storage</span></td>
      <td class="jd-linkcol"><span class="sympad">磁盘大小 带单位 用于前台显示概要信息。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
</table>
<h2><a name="example"></a>应用举例</h2>
    <p>1.查询主机id为2的所有虚拟机网络吞吐量。</p>
    <dl>
      <dt><b>请求</b></dt>
      <div class="source">
        <pre class="prettyprint lang-xml">GET http://localhost:8080/cas/casrs/host/summary/2
accept: application/xml
...
        </pre>
      </div>
      <dt><b>回应</b></dt>
      <div class="source"><pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;host&gt;<br>  &lt;name&gt;server3&lt;/name&gt;<br>  &lt;ip&gt;192.168.10.3&lt;/ip&gt;<br>  &lt;model&gt;FlexServer R390&lt;/model&gt;<br>  &lt;vendor&gt;H3C&lt;/vendor&gt;<br>  &lt;cpuModel&gt;Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz&lt;/cpuModel&gt;<br>  &lt;cpuFrequence&gt;2000&lt;/cpuFrequence&gt;<br>  &lt;diskSize&gt;226053&lt;/diskSize&gt;<br>  &lt;memorySize&gt;23815&lt;/memorySize&gt;<br>  &lt;cpuNum&gt;2 * 6 核&lt;/cpuNum&gt;<br>  &lt;vmNum&gt;17&lt;/vmNum&gt;<br>  &lt;cpuRate&gt;14.271844660194175&lt;/cpuRate&gt;<br>  &lt;memRate&gt;77.19262135922331&lt;/memRate&gt;<br>  &lt;status&gt;1&lt;/status&gt;<br>  &lt;runTime&gt;5天13时9分29秒&lt;/runTime&gt;<br>  &lt;version&gt;CVK 2.0 (C0205)&lt;/version&gt;<br>  &lt;cpuFrequenceGhz&gt;2.0GHz&lt;/cpuFrequenceGhz&gt;<br>  &lt;memory&gt;23.26GB&lt;/memory&gt;<br>  &lt;storage&gt;220.75GB&lt;/storage&gt;<br>&lt;/host&gt;<br></pre>
      </div>
    </dl>
</div>
</div>
</div>
</body>
</html>